﻿using BlogSystem.Ability.Docking.UserApp;
using BlogSystem.Ability.Docking.UserApp.Dto;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Mvc;

namespace BlogSystem.Web.Controllers
{
    [EnableCors("any")]
    [ApiController]
    [Microsoft.AspNetCore.Mvc.Route("api/[controller]")]
    public class LoginController:ControllerBase
    {
        public IUserServicer UserServicer {  get; set; }

        [HttpGet]
        public async Task<LoginSuccessDto> CheckLogin(string userName,string password)
        {
            return await UserServicer.CheckLogin(userName, password);
        }
    }
}
